home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Source / MiscMergeKit / _MiscIfPlaceHolder.h next >
Encoding:
Text File  |  1995-07-08  |  1.4 KB  |  47 lines

  1. //
  2. //    _MiscIfPlaceHolder.h -- if status container used by MiscIfStack
  3. //        Written by Don Yacktman Copyright (c) 1995 by Don Yacktman.
  4. //                Version 1.0.  All rights reserved.
  5. //        This notice may not be removed from this source code.
  6. //
  7. //    This object is included in the MiscKit by permission from the author
  8. //    and its use is governed by the MiscKit license, found in the file
  9. //    "LICENSE.rtf" in the MiscKit distribution.  Please refer to that file
  10. //    for a list of all applicable permissions and restrictions.
  11. //    
  12.  
  13.  
  14. // A simple data container used to keep track of the status of nested ifs
  15. // This is a private class used by the MiscIfStack class.
  16. // This class is merely a container.  It doesn't have any functional logic.
  17.  
  18. #import <appkit/appkit.h>
  19.  
  20. typedef enum _Misc_IF_Type {
  21.         MISC_IF_START = 0,
  22.         MISC_IF_ELSE
  23. } Misc_IF_Type;
  24.  
  25. // This is three state since if a nested if begins inside of an if
  26. // that evaluated false, it _and_ it's else should not be executed.
  27. // Thus we call them "dead".  So, any if or else blocks inside of
  28. // an inactive if or else block are considered dead.
  29. typedef enum _Misc_IF_Activity {
  30.         MISC_IF_INACTIVE = 0,
  31.         MISC_IF_ACTIVE,
  32.         MISC_IF_DEAD
  33. } Misc_IF_Activity;
  34.  
  35. @interface _MiscIfPlaceHolder : Object
  36. {
  37.     Misc_IF_Activity activity;
  38.     Misc_IF_Type ifType;
  39. }
  40.  
  41. - (Misc_IF_Activity)activity;
  42. - setActivity:(Misc_IF_Activity)flag;
  43.  
  44. - (Misc_IF_Type)ifType;
  45. - setIfType:(Misc_IF_Type)theType;
  46.  
  47. @end